#ifndef _AHRS_H_
#define _AHRS_H_
#include <stdint.h>

#define PI (3.1415926)

typedef struct {
  float x;
  float y;
  float z;
} AHRS_Accel_t;

typedef struct {
  float Pitch;
  float Roll;
  float Yaw;
} AHRS_Angle_t;

typedef struct {
  float x;
  float y;
  float z;
} AHRS_Gyro_t;

/**
 * @brief IMU数据换算
 *
 */
void AHRS_PraseIMU(AHRS_Accel_t *accel, AHRS_Gyro_t *gyro, int16_t *imu_accel,
                   int16_t *imu_gyro);

/**
 * @brief 计算欧拉角
 *
 */
void AHRS_PraseAngle(AHRS_Angle_t *euler, AHRS_Accel_t *accel);
#endif
